import request from '@/utils/request'

// 查询合同对方列表
export function listCounterparty(query) {
  return request({
    url: '/cst/counterparty/list',
    method: 'get',
    params: query
  })
}

// 查询合同对方详细
export function getCounterparty(counterpartyId) {
  return request({
    url: '/cst/counterparty/' + counterpartyId,
    method: 'get'
  })
}

// 新增合同对方
export function addCounterparty(data) {
  return request({
    url: '/cst/counterparty',
    method: 'post',
    data: data
  })
}

// 修改合同对方
export function updateCounterparty(data) {
  return request({
    url: '/cst/counterparty',
    method: 'put',
    data: data
  })
}

// 删除合同对方
export function delCounterparty(counterpartyId) {
  return request({
    url: '/cst/counterparty/' + counterpartyId,
    method: 'delete'
  })
}
